export const tableOption = {
  border: true,
  index: true,
  indexLabel: "序号",
  stripe: true,
  menuAlign: "center",
  align: "center",
  searchMenuSpan: 24,
  searchMenuPosition: "center",
  editBtn: false,
  delBtn: false,
  dialogDrag: true,
  height: "60vh",
  menuWidth: 250,
  cellBtn: false,
  cancelBtn: false,
  //menuType:'menu',
  //menuBtnTitle:'操作',
  searchEnter: true,
  refreshBtn: true,
  columnBtn: true,
  searchShowBtn: true,
  addBtn: false,
  column: [
    {
      type: "input",
      label: "工单号",
      prop: "docNo",
      span: 12,
      width: 130,
      search: true,
      searchOrder: 4,
    },
    {
      type: "input",
      label: "PO",
      prop: "customerOrderNo",
      span: 12,
      width: 60,
      search: true,
      searchOrder: 4,
    },
    {
      type: "input",
      label: "代码",
      prop: "customerCode",
      span: 12,
      width: 80,
      search: true,
      searchOrder: 4,
    },
    {
      type: "input",
      label: "订单号",
      prop: "salesOrderDocNo",
      span: 12,
      width: 130,
      search: true,
      searchOrder: 4,
    },
    {
      type: "input",
      label: "品号",
      prop: "itemCode",
      width: 120,
      span: 12,
      search: true,
      searchOrder: 3,
    },
    /*    {
          type:"select",
          label: "产线",
          prop: "lineId",
          span: 12,
          display: false,
          hide:false,
          dicData:[],
          multiple:true,
          dicUrl: '/admin-api/o3-pfoc/realityproductlinemain/getLineList',
          props: {
            label: "realityLineName",
            value: "id"
          },
          dicMethod: "get",
          cell:true,
        },*/
    {
      type: "input",
      label: "排产信息",
      prop: "workOrderInfo",
      span: 12,
      labelWidth: 110,
      width: 1000,
      display: false,
      slot: true,
      hide: true,
    },
    {
      type: "input",
      label: "报废数量",
      prop: "scrapQty",
      span: 12,
      formatter: (val, value, label) => {
        val.scrapQty = Number(val.scrapQty);
        return val.scrapQty;
      },
      hide: true,
    },
    {
      type: "input",
      label: "完成数量",
      prop: "moCompletedQty",
      span: 12,
      hide: true,
    },
    {
      type: "input",
      label: "入库数量",
      prop: "completedQty",
      span: 12,
      formatter: (val, value, label) => {
        val.completedQty = Number(val.completedQty);
        return val.completedQty;
      },
    },
    {
      type: "input",
      label: "预计产量",
      prop: "planQty",
      span: 12,
      formatter: (val, value, label) => {
        val.planQty = Number(val.planQty);
        return val.planQty;
      },
    },
    /*    {
          type: "input",
          label: "申请数量",
          prop: "reqQty",
          span: 12,
          formatter:(val,value,label)=>{
            val.reqQty=Number(val.reqQty)
            return val.reqQty
          }
        },*/
    /*    {
      type: "datetime",
      label: "入库时间",
      prop: "storeDate",
      span: 12,
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
      slot:true,
    },*/
    {
      type: "datetime",
      label: "批准日期",
      prop: "approvedate",
      span: 12,
      format: "yyyy-MM-dd HH:mm:ss",
      valueFormat: "yyyy-MM-dd HH:mm:ss",
    },
    /*    {
          type:"select",
          label: "分配状态",
          prop: "distributeStatus",
          span: 12,
          display: false,
          hide:false,
          dicData:[
             {
               label:'未分配',
               value:'未分配'
             },{
               label:'已分配',
               value:'已分配'
             }
          ],
          html:true,//配置html设置为true即可支持formatter转义html代码
          formatter:(val) => {
            if( val.distributeStatus=='未分配') {
              return '<b style="color:red">未分配</b>'
            }else{
              return '<b style="color:green">已分配</b>'
            }
          },
        },*/
    {
      type: "select",
      label: "工单状态",
      prop: "moStatus",
      span: 12,
      dicUrl: "/admin-api/system/dict-data/type?type=workorder_status",
      props: {
        label: "label",
        value: "value",
      },
      dicMethod: "get",
      search: true,
      searchOrder: 2,
      html: true, //配置html设置为true即可支持formatter转义html代码
      formatter: (val) => {
        if (val.moStatus == "未生产") {
          return '<b style="color:red">未生产</b>';
        } else if (val.moStatus == "生产中") {
          return '<b style="color:green">生产中</b>';
        } else if (val.moStatus == "指定完工") {
          return '<b style="color:orange">指定完工</b>';
        } else if (val.moStatus == "已完工") {
          return '<b style="color:rgba(68,68,68,0.73)">已完工</b>';
        } else if (val.moStatus == "已发料") {
          return '<b style="color:rgba(221,31,132,0.73)">已发料</b>';
        }
      },
    },
    {
      type: "datetime",
      label: "出货日期",
      prop: "planShipDate",
      span: 12,
      format: "yyyy-MM-dd",
      valueFormat: "yyyy-MM-dd",
      cell: true,
      slotform: true,
      search: true,
      searchOrder: 0,
      formatter: (val) => {
        if (val.planShipDate == null) {
          return "--";
        }
        return val.planShipDate;
      },
    },

    /*{
      type: "select",
      label: "排产状态",
      prop: "scheduleStatus",
      span: 12,
      dicUrl: "/admin-api/system/dict-data/type?type=schedule_status",

      dicMethod: "get",
      search: true,
      searchOrder: 2,


    },*/
  ],
};
